<template>
  <div>
      <header>
        <button @click="goBack">返回</button>
      </header>
      <img style="width: 100%" :src="detailInfo.img" alt="">
  </div>
</template>

<script>
// import aaa from '../utils'
// as 起别名
// import * as aaa from '../utils'
import axios from 'axios'
export default {
  // Mockjs
  // vue.config.js
  created() {
    // console.log(this.$route)
    axios.get('/getDetail', {
      params: {
        id: this.$route.query.id
      }
    }).then(res => {
      this.detailInfo = res.data.data
    })
  },
  data() {
    return {
      detailInfo: {}
    }
  },
  methods: {
    goBack() {
      // this.$router.back()
      this.$router.go(-1)
    }
  }
}
</script>

<style>

</style>